<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditMateriaTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditMateriaLabel_idMateria}" for="idMateria" />
                    <h:inputText id="idMateria" value="#{materiaController.selected.idMateria}" title="#{bundle.EditMateriaTitle_idMateria}" required="true" requiredMessage="#{bundle.EditMateriaRequiredMessage_idMateria}"/>
                    <h:outputLabel value="#{bundle.EditMateriaLabel_idCurso}" for="idCurso" />
                    <h:inputText id="idCurso" value="#{materiaController.selected.idCurso}" title="#{bundle.EditMateriaTitle_idCurso}" />
                    <h:outputLabel value="#{bundle.EditMateriaLabel_idProfesor}" for="idProfesor" />
                    <h:inputText id="idProfesor" value="#{materiaController.selected.idProfesor}" title="#{bundle.EditMateriaTitle_idProfesor}" />
                    <h:outputLabel value="#{bundle.EditMateriaLabel_nombre}" for="nombre" />
                    <h:inputText id="nombre" value="#{materiaController.selected.nombre}" title="#{bundle.EditMateriaTitle_nombre}" />
                    <h:outputLabel value="#{bundle.EditMateriaLabel_hora}" for="hora" />
                    <h:inputText id="hora" value="#{materiaController.selected.hora}" title="#{bundle.EditMateriaTitle_hora}" />
                    <h:outputLabel value="#{bundle.EditMateriaLabel_horario}" for="horario" />
                    <h:inputText id="horario" value="#{materiaController.selected.horario}" title="#{bundle.EditMateriaTitle_horario}" />
                    <h:outputLabel value="#{bundle.EditMateriaLabel_numHoras}" for="numHoras" />
                    <h:inputText id="numHoras" value="#{materiaController.selected.numHoras}" title="#{bundle.EditMateriaTitle_numHoras}" />
                </h:panelGrid>
                <h:commandLink action="#{materiaController.update}" value="#{bundle.EditMateriaSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditMateriaViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{materiaController.prepareList}" value="#{bundle.EditMateriaShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditMateriaIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
